package com.example.springretrydemo;

import com.example.springretrydemo.test.UserFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalTime;

@RestController
public class TestController {

    @Autowired
    private TestService testService;
    @Autowired
    private UserFacade userFacade;

    @GetMapping("/test")
    public int testCtl(int code) throws Exception {

        return testService.test(code);
    }

    @GetMapping("/test1")
    public int tesQuery() throws Exception {
        userFacade.query();
        return 1;
    }
    @GetMapping("/test2")
    public int testAdd() throws Exception {
        userFacade.add();
        return 1;
    }


}
